#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
	int n;
	cin >> n;
	vector<int> a(n - 1);
	vector<int> b(n - 1);
	for (int i = 0; i < n - 1 ; i++) {
		cin >> a[i];
	}
	for (int i = 0; i < n - 1 ; i++) {
		cin >> b[i];
	}

	sort(a.begin(), a.end());
	sort(b.begin(), b.end());

	vector<int> diffA(n - 1);
	vector<int> diffB(n - 1);

	vector<int> res(n);
	
	for (int i = 0; i < n - 1; i++) {
		if (i == 0) {
			diffA[i] = a[i];
			diffB[i] = b[i];
		}	
		else {
			diffA[i] = a[i] - a[i - 1];
			diffB[i] = b[i] - b[i - 1];
		}
	}
	int left = 0, right = 0;

	for (int k = 0; k < n; k++) {
		if (diffA[left] != diffB[right]) {
			res[k] = diffA[left];
			left++;
		} else {
			res[k] = diffA[left];
			left++;
			right++;
		}
	}
	
	for (int i = 0; i < n; i++)
		cout << res[i] << " ";
	return 0;
}



